/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.smn.jsf;

import com.smn.domain.MyUser;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author Ant Ongun Kefeli
 */
@ManagedBean(name="friendTableBean")
@SessionScoped
public class FriendTableBean implements Serializable {

    private List<MyUser> friends;

    /** Creates a new instance of friendTableBean */
    public FriendTableBean() {
        friends = new ArrayList<MyUser>();
        MyUser friend = new MyUser();
        friend.setDateCreated(new Date());
        friends.add(friend);
    }

    public List<MyUser> getFriends() {
        return friends;
    }

    public void setFriends(List<MyUser> friends) {
        this.friends = friends;
    }

    public void enlargeList() {
        MyUser friend = new MyUser();
        friend.setDateCreated(new Date());
        friends.add(friend);
    }
}
